#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <wait.h>

int main ()
{
    int       pid;
    int         pip[2];
    char        buff[20];

    if (1 > pipe (pip))
        return -1;
    puts("pipe opened");

    if ((pid=fork()))
    {
        /* pere */
        close(tab[0]);
        write (tab[1], "je suis ton papa", 19);
        return 0;

    }
    close (tab[1]);
    read (tab[0], buff, 19);
    buff[19] = 0;
    printf("dv:%s", buff);
    printf("NOOOOOON!\n");
    return 0;
}
